import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../view/Home.vue'

import Login from '../view/Login.vue'
import Register from '../view/Register.vue'

import TestDetails from '../view/TestDetails.vue'
import Personal from '../view/user/Personal.vue'
import EditData from '../view/user/Edit_data.vue'
import Follows from '../view/user/Follows.vue'
import Star from '../view/user/Star.vue'
import MoreComment from '../view/MoreComment.vue'
import Search from '../view/Search.vue'
import MyComments from '../view/user/MyComments.vue'
import ManageCategory from '../view/user/ManageCategory.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/home' },
  { path: '/home', name: 'Home', component: Home },
  { path: '/login', name: 'Login', component: Login },
  { path: '/testdetails/:id', name: 'TestDetails', component: TestDetails },
  { path: '/register', name: 'Register', component: Register },
  { path: '/personal', name: 'Personal', component: Personal },
  { path: '/edit_data', name: 'EditData', component: EditData },
  { path: '/follows', name: 'Follows', component: Follows },
  { path: '/search', name: 'Search', component: Search },
  { path: '/star', name: 'Star', component: Star },
  { path: '/morecomment/:id', name: 'MoreComment', component: MoreComment },
  { path: '/mycomments', name: 'MyComments', component: MyComments },
  { path: '/managecategory', name: 'ManageCategory', component: ManageCategory }
]
const router = new VueRouter({
  routes
})

export default router
